<?php

namespace App\Base;

class Service
{
    /**
     * get the instance of the given class
     *
     * @return static
     */
    public static function getInstance()
    {
        if(!app()->has(static::class)) {
            app()->instance(static::class, app()->make(static::class));
        }
        return app()->get(static::class);
    }
}
